From 680d79f10bb70691a9ae3b4a6a8b669e0f2837f6 Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Fri, 25 Jul 2014 11:53:31 +0200 Subject: [PATCH] x86/gdbsx: invert preconditions for XEN_DOMCTL_gdbsx_{,un}pausevcpu hypercalls c/s 3eb1c708ab "properly reference count DOMCTL_{,un}pausedomain hypercalls" accidentally inverted the use of d->controller_pause_count. Revert back to how it was originally, i.e. the XEN_DOMCTL_gdbsx_{,un}pausevcpu hypercalls are only valid for a domain already paused by the system controller. Reported-by: Jan Beulich Signed-off-by: Andrew Cooper --- xen/arch/x86/domctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c index d62c715ca3..243f42ffa9 100644 --- a/xen/arch/x86/domctl.c +++ b/xen/arch/x86/domctl.c @@ -1027,7 +1027,7 @@ long arch_do_domctl( struct vcpu *v; ret = -EBUSY; - if ( d->controller_pause_count > 0 ) + if ( !d->controller_pause_count ) break; ret = -EINVAL; if ( domctl->u.gdbsx_pauseunp_vcpu.vcpu >= MAX_VIRT_CPUS || @@ -1043,7 +1043,7 @@ long arch_do_domctl( struct vcpu *v; ret = -EBUSY; - if ( d->controller_pause_count > 0 ) + if ( !d->controller_pause_count ) break; ret = -EINVAL; if ( domctl->u.gdbsx_pauseunp_vcpu.vcpu >= MAX_VIRT_CPUS || -- 2.30.2